#include <Interactiv/InteractivPublic.h>
#include "OsgExTool/OSGUniverseTool.h"
//
EffectsText::EffectsText()
{

}

EffectsText::~EffectsText()
 {

 }

void EffectsText::setOrtho(int w, int h)
{
	mWidth = w * 0.5 ;
	mHeight = h * 0.5;

	mCamera->setProjectionMatrixAsOrtho2D(-mWidth, mWidth, -mHeight, mHeight);
}

void EffectsText::init()
{
	mCamera = OSGUniverseTool::createTextHUD(mTextDrawable);
	addChild(mCamera);
	mTextDrawable->setPosition(osg::Vec3(300, 200, 0));
}

osg::ref_ptr<osgText::Text> EffectsText::getText()
{
	return mTextDrawable;
}

osg::ref_ptr<osg::Camera> EffectsText::getCamera()
{
	return mCamera;
}







